package cn.hill4j.tool.spring.ext.iop.dynamic;

import org.springframework.beans.factory.FactoryBean;

/**
 * 动态feignClient构造器接口
 *
 * @author: hillchen
 * Date: 2023-02-16 10:36
 */
public interface DymIopClientsBuilder extends FactoryBean<DymIopClientFactory> {

    @Override
    default Class<?> getObjectType() {
        return DymIopClientFactory.class;
    }
    /**
     * @author hillchen
     * Description: feignClient接口类型
     * Date: 2023/8/11 00:38
     * @param <T> feignClient接口类型
     * @return Class
     **/
    <T> Class<T> getInterfaceClazz();
    /**
     * @author hillchen
     * Description: 设置feignClient接口类型
     * Date: 2023/8/11 00:38
     * @param <T> feignClient接口类型
     * @param interfaceClazz feignClient接口类型
     **/
    <T> void setInterfaceClazz(Class<T> interfaceClazz);
    /**
     * @author hillchen
     * Description: 获取动态健值获取器
     * Date: 2023/8/11 00:39
     * @return DymKeySelector
     **/
    DymKeySelector getDymKeySelector();
    /**
     * @author hillchen
     * Description: 设置动态健值获取器
     * Date: 2023/8/11 00:40
     * @param dymKeySelector 动态健值获取器
     **/
    void setDymKeySelector(DymKeySelector dymKeySelector);
    /**
     * @author hillchen
     * Description: 获取contextId
     * Date: 2023/8/11 00:40
     * @return String
     **/
    default String contextId(){
        return "#dymIop." + getInterfaceClazz().getSimpleName();
    }
}
